﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LotteryVote.Data;
using LotteryVote.Entity;

namespace LotteryVote.Logic
{
    public class RoleFacade
    {
        private RoleDataAccess daRole;
        public RoleFacade()
        {
            daRole = new RoleDataAccess();
        }
        public void Insert(string roleName)
        {
            Role role = new Role { RoleName = roleName };
            daRole.Insert(role);
        }
        public void Delete(int roleId)
        {
            daRole.Delete(roleId);
        }

        public IEnumerable<Role> GetAllRoles()
        {
            return daRole.GetRoles();
        }
    }
}
